/**
 * Project: push-center-biz-core
 * 
 * File Created at 2014年10月9日
 * 
 * Copyright 2012 Greenline.com Corporation Limited.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * Greenline Company. ("Confidential Information").  You shall not
 * disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with Greenline.com.
 */
package com.greenline.push.core.pushcenter.impl;

import java.util.List;

import javax.annotation.Resource;

import com.greenline.push.core.pushcenter.AppChannelManager;
import com.greenline.push.dal.pushcenter.AppChannelDAO;
import com.greenline.push.dal.pushcenter.dataobject.AppChannelDO;
import com.greenline.push.dal.query.AppChannelQuery;

/**
 * @Type AppChannelManagerImpl
 * @Desc 
 * @author zhaoli
 * @date 2014年10月9日
 * @Version V1.0
 */
public class AppChannelManagerImpl implements AppChannelManager {
	@Resource
	private AppChannelDAO appChannelDAO;

	/* (non-Javadoc)
	 * @see com.greenline.push.core.pushcenter.AppChannelManager#insert(com.greenline.push.dal.pushcenter.dataobject.AppChannelDO)
	 */
	@Override
	public Long insert(AppChannelDO appChannel) {
		return appChannelDAO.insert(appChannel);
	}

	/* (non-Javadoc)
	 * @see com.greenline.push.core.pushcenter.AppChannelManager#getAppChannelById(java.lang.Long)
	 */
	@Override
	public AppChannelDO getAppChannelById(Long id) {
		return appChannelDAO.getAppChannelById(id);
	}

	/* (non-Javadoc)
	 * @see com.greenline.push.core.pushcenter.AppChannelManager#update(com.greenline.push.dal.pushcenter.dataobject.AppChannelDO)
	 */
	@Override
	public boolean update(AppChannelDO appChannel) {
		return appChannelDAO.update(appChannel) > 0;
	}

	/* (non-Javadoc)
	 * @see com.greenline.push.core.pushcenter.AppChannelManager#listByQuery(com.greenline.push.dal.query.AppChannelQuery)
	 */
	@Override
	public AppChannelQuery listByQuery(AppChannelQuery query) {
		return appChannelDAO.listByQuery(query);
	}

	/* (non-Javadoc)
	 * @see com.greenline.push.core.pushcenter.AppChannelManager#listByQuery(java.lang.Long)
	 */
	@Override
	public boolean delete(Long id) {
		return appChannelDAO.delete(id) > 0;
	}

    @Override
    public List<AppChannelDO> listByExample(AppChannelDO appChannel) {
        return appChannelDAO.listByExample(appChannel);
    }

}
